home *** CD-ROM | disk | FTP | other *** search
/ Workbench Add-On / Workbench Add-On - Volume 1.iso / BBS-Archive / Comm / AmiTCP30b2.lha / src / netlib / fibex.h < prev    next >
C/C++ Source or Header  |  1994-03-29  |  3KB  |  82 lines

  1. /* $Id: fibex.h,v 3.1 1994/03/29 12:50:52 ppessi Exp $
  2.  *
  3.  * fibex.h --- extensions to FIB 
  4.  *
  5.  * This file is part of the AmiTCP/IP Network Support Library.
  6.  *
  7.  * Copyright © 1993,1994 AmiTCP/IP Group, <amitcp-group@hut.fi>
  8.  *             Helsinki University of Technology, Finland.
  9.  *             All rights reserved.
  10.  *
  11.  * Created      : Wed Sep 15 02:20:20 1993 ppessi
  12.  * Last modified: Sun Mar 27 21:14:56 1994 ppessi
  13.  *
  14.  */
  15.  
  16. #include <dos/dosextens.h>
  17.  
  18. /*
  19.  * This is already in 3.0 includes
  20.  */
  21. #ifndef FIBB_OTR_READ
  22. #define FileInfoBlock myFileInfoBlock
  23.  
  24. /* Returned by Examine() and ExNext(), must be on a LONG boundary */
  25. struct FileInfoBlock {
  26.    LONG      fib_DiskKey;
  27.    LONG      fib_DirEntryType;
  28.    char      fib_FileName[108]; 
  29.    LONG      fib_Protection;    
  30.    LONG      fib_EntryType;
  31.    LONG      fib_Size;         
  32.    LONG      fib_NumBlocks;     
  33.    struct DateStamp fib_Date;
  34.    char      fib_Comment[80];   
  35.    /* Note: the following fields are not supported by all filesystems.    */
  36.    /* They should be initialized to 0 sending an ACTION_EXAMINE packet.    */
  37.    /* When Examine() is called, these are set to 0 for you.        */
  38.    /* AllocDosObject() also initializes them to 0.            */
  39.    UWORD  fib_OwnerUID;        /* owner's UID */
  40.    UWORD  fib_OwnerGID;        /* owner's GID */
  41.    char      fib_Reserved[32];
  42. }; /* FileInfoBlock */
  43.  
  44. /* FIB stands for FileInfoBlock */
  45.  
  46. /* FIBB are bit definitions, FIBF are field definitions */
  47. /* Regular RWED bits are 0 == allowed. */
  48. /* NOTE: GRP and OTR RWED permissions are 0 == not allowed! */
  49. /* Group and Other permissions are not directly handled by the filesystem */
  50. #define FIBB_OTR_READ       15    /* Other: file is readable */
  51. #define FIBB_OTR_WRITE       14    /* Other: file is writable */
  52. #define FIBB_OTR_EXECUTE   13    /* Other: file is executable */
  53. #define FIBB_OTR_DELETE    12    /* Other: prevent file from being deleted */
  54. #define FIBB_GRP_READ       11    /* Group: file is readable */
  55. #define FIBB_GRP_WRITE       10    /* Group: file is writable */
  56. #define FIBB_GRP_EXECUTE   9    /* Group: file is executable */
  57. #define FIBB_GRP_DELETE    8    /* Group: prevent file from being deleted */
  58.  
  59. #define FIBF_OTR_READ       (1<<FIBB_OTR_READ)
  60. #define FIBF_OTR_WRITE       (1<<FIBB_OTR_WRITE)
  61. #define FIBF_OTR_EXECUTE   (1<<FIBB_OTR_EXECUTE)
  62. #define FIBF_OTR_DELETE    (1<<FIBB_OTR_DELETE)
  63. #define FIBF_GRP_READ       (1<<FIBB_GRP_READ)
  64. #define FIBF_GRP_WRITE       (1<<FIBB_GRP_WRITE)
  65. #define FIBF_GRP_EXECUTE   (1<<FIBB_GRP_EXECUTE)
  66. #define FIBF_GRP_DELETE    (1<<FIBB_GRP_DELETE)
  67.  
  68. #endif /* defined(FIBB_OTR_READ) */
  69.  
  70. /*
  71.  * These are probably defined only for MuFS
  72.  */
  73. #define FIBB_SUID 31
  74. #define FIBB_SGID 30        /* in MuFS 2, perhaps? */
  75.  
  76. #define FIBF_SUID (1<<FIBB_SUID)
  77. #define FIBF_SGID (1<<FIBB_SGID)
  78.  
  79. void __dostat(struct FileInfoBlock *fib, struct stat *st);
  80. extern struct FileInfoBlock __dostat_fib[];
  81.  
  82.